<!DOCTYPE html>
<html lang="en">
<head>
<title>WebView4Delphi: uWVTypeLibrary: Interface ICoreWebView2Profile8</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0-snapshot">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<span id="ICoreWebView2Profile8"></span><h1 class="cio">Interface ICoreWebView2Profile8</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section">Fields</div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section">Properties</div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="uWVTypeLibrary.html">uWVTypeLibrary</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type ICoreWebView2Profile8 = interface(<a class="normal" href="uWVTypeLibrary.ICoreWebView2Profile7.html">ICoreWebView2Profile7</a>)</code></p>
<h2 class="description">Description</h2>
<p>
 This is the profile interface that manages profile deletion. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2profile8">https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2profile8</a>&quot;&gt;See the ICoreWebView2Profile8 article.)</p>
<span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">IUnknown</li>
<li class="ancestor"><a class="normal" href="uWVTypeLibrary.ICoreWebView2Profile.html">ICoreWebView2Profile</a></li>
<li class="ancestor"><a class="normal" href="uWVTypeLibrary.ICoreWebView2Profile2.html">ICoreWebView2Profile2</a></li>
<li class="ancestor"><a class="normal" href="uWVTypeLibrary.ICoreWebView2Profile3.html">ICoreWebView2Profile3</a></li>
<li class="ancestor"><a class="normal" href="uWVTypeLibrary.ICoreWebView2Profile4.html">ICoreWebView2Profile4</a></li>
<li class="ancestor"><a class="normal" href="uWVTypeLibrary.ICoreWebView2Profile5.html">ICoreWebView2Profile5</a></li>
<li class="ancestor"><a class="normal" href="uWVTypeLibrary.ICoreWebView2Profile6.html">ICoreWebView2Profile6</a></li>
<li class="ancestor"><a class="normal" href="uWVTypeLibrary.ICoreWebView2Profile7.html">ICoreWebView2Profile7</a></li>
<li class="thisitem">ICoreWebView2Profile8</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2Profile8.html#Delete">Delete</a></strong>: HResult; stdcall;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2Profile8.html#add_Deleted-ICoreWebView2ProfileDeletedEventHandler-EventRegistrationToken-">add_Deleted</a></strong>(const eventHandler: <a href="uWVTypeLibrary.ICoreWebView2ProfileDeletedEventHandler.html">ICoreWebView2ProfileDeletedEventHandler</a>; out token: <a href="uWVTypeLibrary.EventRegistrationToken.html">EventRegistrationToken</a>): HResult; stdcall;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVTypeLibrary.ICoreWebView2Profile8.html#remove_Deleted-EventRegistrationToken-">remove_Deleted</a></strong>(token: <a href="uWVTypeLibrary.EventRegistrationToken.html">EventRegistrationToken</a>): HResult; stdcall;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Delete"></span><code>function <strong>Delete</strong>: HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 After the API is called, the profile will be marked for deletion. The local profile's directory will be deleted at browser process exit. If it fails to delete, because something else is holding the files open, WebView2 will try to delete the profile at all future browser process starts until successful. The corresponding CoreWebView2s will be closed and the CoreWebView2Profile.Deleted event will be raised. See `CoreWebView2Profile.Deleted` for more information. If you try to create a new profile with the same name as an existing profile that has been marked as deleted but hasn't yet been deleted, profile creation will fail with HRESULT_FROM_WIN32(ERROR_DELETE_PENDING).

<p>\snippet SettingsComponent.cpp DeleteProfile </p>
<h6 class="description_section">Attributes</h6>
<dl class="attributes">
  <dt>GUID['{FBF70C2F-EB1F-4383-85A0-163E92044011}']</dt>
  <dd></dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="add_Deleted-ICoreWebView2ProfileDeletedEventHandler-EventRegistrationToken-"></span><code>function <strong>add_Deleted</strong>(const eventHandler: <a href="uWVTypeLibrary.ICoreWebView2ProfileDeletedEventHandler.html">ICoreWebView2ProfileDeletedEventHandler</a>; out token: <a href="uWVTypeLibrary.EventRegistrationToken.html">EventRegistrationToken</a>): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Add an event handler for the `Deleted` event. The `Deleted` event is raised when the profile is marked for deletion. When this event is raised, the CoreWebView2Profile and its corresponding CoreWebView2s have been closed, and cannot be used anymore.

<p>\snippet AppWindow.cpp ProfileDeleted </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="remove_Deleted-EventRegistrationToken-"></span><code>function <strong>remove_Deleted</strong>(token: <a href="uWVTypeLibrary.EventRegistrationToken.html">EventRegistrationToken</a>): HResult; stdcall;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Removes an event handler previously added with `add_Deleted`. </p>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0-snapshot</a>. </em>
</span>
</body></html>
